package com.qingcheng.service.impl;

import com.qingcheng.service.business.AdService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by yuanxin
 * Date:2019/7/4
 * Time:16:46
 */
@Component
public class init implements InitializingBean {
    @Autowired
    private AdService adService;
    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("广告缓存预热");
        adService.saveAllAdToRedis();
    }
}
